<asset:javascript src="application" />
<asset:javascript src="spring-websocket" />
<script type="text/javascript">
    $(function() {

        var socket = new SockJS("http://localhost:8080/stomp");
        var client = Stomp.over(socket);

        client.connect({}, function() {
            client.subscribe("/topic/notice", function(message) {
                console.log(message.body);
            });
        });

        $("#helloButton").click(function() {
            client.send("/topic/notice", {}, JSON.stringify("world"));
        });
    });
</script>
<button id="helloButton"/>